Skip to content

test(evaluators): edge cases for Equals and NotEquals - #414

Open
Ankit-cs wants to merge 2 commits into
StackGuardian:mainfrom
Ankit-cs:test/equals-not-equals-edge-cases
Open

Ankit-cs wants to merge 2 commits into
StackGuardian:mainfrom
Ankit-cs:test/equals-not-equals-edge-cases

Conversation

@Ankit-cs

Copy link
Copy Markdown
Contributor

Related to #406

Pull Request Template

Description

  • What changes are being made?

    • Added unit test coverage for the 5 requested edge cases in both tests/core/evaluators/test_equals.py and tests/core/evaluators/test_not_equals.py:
      1. Dicts with different key order ({"a": 1, "b": 2} vs {"b": 2, "a": 1})
      2. Nested lists ([[1, 2], [3, 4]] equal and [[1, 2]] vs [[1, 3]] unequal)
      3. "1" vs 1
      4. None vs None and None vs 1
      5. True vs 1
  • Verdict Note on True vs 1:

    • True == 1 evaluates to passed: True because in Python bool inherits from int. As noted in the issue, if strict type distinction between booleans and integers is desired, a follow-up PR can be opened to add type checking.
  • Which issues or tickets does this PR close or relate to?

Type of Change

  • Documentation / Tests update (non-breaking change which adds test coverage)

Checklist

  • Code has been linted.
  • Documentation has been updated (if needed).
  • Tests have been added or updated (if needed).
  • Any breaking changes have been communicated to the team.

Additional Information

  • All 5 edge cases tested and verified across both Equals and NotEquals evaluators with 100% passing tests.
  • Contains exactly 1 clean commit based off origin/main.

@Ankit-cs

Copy link
Copy Markdown
Contributor Author

looking for feedback @refeed

@Ankit-cs

Copy link
Copy Markdown
Contributor Author

Please look my pr for the above issue @refeed , @Akshat0694 , @arunim2405

@refeed

refeed commented Oct 31, 2026

Copy link
Copy Markdown
Member

Hi Ankit, the PR looks good, but could you fix the linting errors in the CI? Thank you

@codecov

codecov Bot commented Oct 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Ankit-cs

Copy link
Copy Markdown
Contributor Author

Hye @refeed,

I've fixed the linting issues by reformatting both tests/core/evaluators/test_equals.py and tests/core/evaluators/test_not_equals.py with black==25.1.0 as specified in the workflow.

All checks and tests are now passing cleanly. Could you please take another look? Thank you!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(evaluators): edge cases for Equals and NotEquals

2 participants